<%--
  Created by IntelliJ IDEA.
  User: Lenovo
  Date: 2022-04-28
  Time: 9:24
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" isELIgnored="false" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <jsp:useBean id="emp" class="com.es.bean.Employee" scope="request"></jsp:useBean>
    <jsp:setProperty name="emp" property="id" value="123"></jsp:setProperty>
    <!--定义一个变量-->
    <c:set value="12" var="a" scope="request"></c:set>
    <!--输出变量的值-->
    <c:out value="${emp.id}"></c:out>
    <!--删除  scope.removeAttribute('emp')-->
    <%--<c:remove var="emp" scope="request"></c:remove>--%>
    emp:${emp}
    <!-- if 判断，-->
    <c:if test="${empty emp}">
        没有员工对象
    </c:if>
    <br>
    <!-- 选择 -->
    <c:choose>
        <c:when test="${empty emp}">
            没有员工信息
        </c:when>
        <c:otherwise>
            工号:${emp.id}
            <br>
            姓名: ${emp.name}
        </c:otherwise>
    </c:choose>
    <!--循环结构-->
    <c:forEach var="i" step="1" begin="0" end="9">
        <h3>HelloWorld</h3>
    </c:forEach>
    <!--跳转-->
    <a href="list">遍历集合</a>
</body>
</html>
